<?php
namespace app\api\validate\Meta;
use yzh52521\validate\Validate;

class WebValidate extends validate{

	/**
	 *@description 验证器规则
	 *@buildcode(true)
	*/
	protected $rule = [
		'meta_id'=>['unique:meta_web'],
		'name'=>['require'],
		'modelrole_id'=>['require'],
		'ttsType_id'=>['require'],
		'sttType_id'=>['require'],
		'chat_id'=>['require'],
		'url'=>['regex'=>'/^((ht|f)tps?):\/\/([\w\-]+(\.[\w\-]+)*\/)*[\w\-]+(\.[\w\-]+)*\/?(\?([\w\-\.,@?^=%&:\/~\+#]*)+)?/'],
		'status'=>['require'],
		'avatar'=>['require'],
		'basicInformation'=>['require'],
		'openingLine'=>['require'],
	];

	/**
	 *@description 错误提示
	 *@buildcode(true)
	*/
	protected $message = [
		'meta_id.unique'=>'meta_id已经存在',
		'name.require'=>'姓名不能为空',
		'modelrole_id.require'=>'形象不能为空',
		'ttsType_id.require'=>'语音合成不能为空',
		'sttType_id.require'=>'语音识别不能为空',
		'chat_id.require'=>'语言模型不能为空',
		'url.regex'=>'链接格式错误',
		'status.require'=>'状态不能为空',
		'avatar.require'=>'头像不能为空',
		'basicInformation.require'=>'详细信息不能为空',
		'openingLine.require'=>'开场白不能为空',
	];

	/**
	 *@description 验证场景
	 *@buildcode(true)
	*/
	protected $scene  = [
	];



}